<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-3.2.1.min.js"></script>
    <script>
        // window.onload = function(){}
        $(function () {
            //$("#mySpan")得到id为mySpan的元素对象
            //html()得到元素标签中间的内容，相当于innerHTML
            // alert($("#mySpan").html());
            //html("123")设置元素标签中间的内容
            // $("#mySpan").html("123");
            // $("#mySpan").innerHTML = "123";
            var obj = document.getElementById("mySpan");
            alert($(obj).html());
        });
    </script>
</head>
<body>
    <span id="mySpan">abc</span>
</body>
</html>